<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!-- --------------------------- -->
<!-- tiles/movie/list.jsp STARTS -->
<!-- --------------------------- -->
<script>
$(document).ready(function() {  
      var movidId = <s:property value='movie.id'/>;//request.QueryString("movie.id");                       
      oscarObject.getMovieListById(movidId , "1", "#directorMovieList");
      oscarObject.getMovieListById(movidId , "2,3,4,5","#actorMovieList");
      videoForm.init();
      descriptionForm.init();
      commentForm.init();
});
</script>
 
<style type="text/css">
		
.playButton {
	width: 160px;
	height: 90px;
	position: absolute;
	z-index: 9;
	background: url(http://cdn.media.abc.go.com/m/images/home/ss_play.png?cb=v6.166) center no-repeat;
	display: block;
}

.videothumb{
/*
	text-align:center;
	vertical-align:middle;
	width:182px;
	height:51px;
	padding:1px;
    border: 1px solid gray;
    */
    float:left;
    margin:13px 20px 37px 25px; 
    height:61px;         
}

.videothumb:hover {
}

</style>


<!-- 添加视频窗口 -->
<div id="addVideoDialog" title="添加视频窗口" style="display:none;">
	<p class="validateTips"></p>
	<form id="videoForm" action="video!addVideo" method="post">
	  <input type="hidden" name="video.movie.id" value="<s:property value='movie.id'/>"/>
	  <input type="hidden" name="video.account.id" value="<s:property value='#session.account.id'/>"/>
	  <input id="videoId" type="hidden" name="video.id" value="<s:property value='video.id'/>"/>
	  <p>	
		<span class="dialog-label">电影:</span>
		<span class="dialog-input"><s:property value="movie.nameCn" escape="false"/></span>
		<span class="dialog-input"><s:property value="movie.name" /></span>
	  </p>
	  <p>	
		<span class="dialog-label">类型:</span>
		<span class="dialog-input">
		   <s:select id="videoName" name="video.name" list="{'正片','预告片','拍摄记录片','花絮'}" theme="simple"></s:select>
  		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">来源:</span>
		<span class="dialog-input">		 
		  <s:textfield id="provider" name="video.provider" theme="simple" size="10" readonly="true" cssStyle="background-color:#cccccc"/>
		  <a id="selectViedoSrc" style="cursor:pointer;">...</a>		  
		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">清晰度:</span>
		<span class="dialog-input">
		  <s:select id="quality" name="video.type" list="#{0:'标清',1:'高清',2:'超清'}"  listKey="key" listValue="value"  theme="simple"></s:select>
		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">地址:</span>
		<span class="dialog-input"><s:textfield id="videoURL" name="video.url" theme="simple" size="45"/></span>		
	  </p>	  
	  <p>	
		<span class="dialog-label">长度:</span>
		<span class="dialog-input"><s:textfield id="length" name="video.length" theme="simple" /></span>
		<span class="dialog-input">分钟</span>		
	  </p>	  
	  <p>
	    <span style="white-space:nowrap;">
	    <input id="responsbility" type="checkbox"/><label for="responsbility" style="margin:-21px 0px 0px 25px;">免责声明</label></span>
	  </p>	  		
	  <p>
	   <span></span>
	   <span>
	    <ul>
	       <li style="width:480px;">本网站使用者因为违反本声明规定而触犯中华人民共和国法律，一切后果自己负责，本网站均得免责。</li>
	       <li>本声明未涉及的问题参见国家有关法律法规，当本声明与国家法律法规冲突时，以国家法律法规为准。</li>
	    </ul>
	    </span>
	  </p>
	</form>
</div>

<!-- 选择来源网站 -->
<div id="selectVideoSrcDialog" title="选择来源网站" style="display:none;">
  </br>
  <p>
    <span id="pptv" style="margin-right:20px;cursor:pointer;"><img src="./img/pptv.png"/></span>
    <span id="youku" style="margin-right:20px;cursor:pointer;"><img src="./img/youku.png"/></span>
    <span id="pps" style="cursor:pointer;"><img src="./img/pps.png"/></span>
  </p>
  <p>
    <span id="qiyi" style="margin-right:20px;cursor:pointer;"><img src="./img/qiyi.png"/></span>
    <span id="tudou" style="margin-right:20px;cursor:pointer;"><img src="./img/tudou.png"/></span>
    <span id="m1905" style="cursor:pointer;"><img src="./img/m1905.png"/></span>
  </p>  
  <p>
    <span id="tv189" style="margin-right:20px;cursor:pointer;"><img src="./img/tv189.png"/></span>
    <span id="56" style="margin-right:20px;cursor:pointer;"><img src="./img/56.png"/></span>
    <span id="sina" style="cursor:pointer;"><img src="./img/sina.png"/></span>
  </p>
  <p>
    <span id="sohu" style="margin-right:20px;cursor:pointer;"><img src="./img/sohu.png"/></span>    
    <span id="xunlei" style="margin-right:20px;cursor:pointer;"><img src="./img/xunlei.png"/></span>
    <span id="smg" style="cursor:pointer;"><img src="./img/smg.png"/></span>
  </p>
  <p>
    <span id="letv" style="margin-right:20px;cursor:pointer;"><img src="./img/letv.png"/></span>    
    <span id="joy" style="margin-right:20px;cursor:pointer;"><img src="./img/joy.png"/></span>
    <span id="baba" style="cursor:pointer;"><img src="./img/baba.png"/></span>
  </p>
  <p>
    <span id="tecent" style="margin-right:20px;cursor:pointer;"><img src="./img/tecent.png"/></span>
    <span id="ku6" style="margin-right:20px;cursor:pointer;"><img src="./img/ku6.png"/></span>        
  </p>  
</div>

<!-- 删除该视频？ -->
<div id="deleteConfirm" title="删除该视频？" style="display:none">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>确定删除该视频？</p>
</div>


<!-- 编辑剧情窗口 -->
<div id="editDescriptionDialog" title="编辑剧情" style="display:none">
	<form id="descriptionForm" action="description!addPlot" method="post">
		<input type="hidden" name="plot.movie.id" value="<s:property value='movie.id'/>"/>
		<input type="hidden" name="plot.account.id" value="<s:property value='#session.account.id'/>"/>	  	
		<textarea id="description" name="plot.content" style="width:550px;height:160px;"><s:property value='movie.plot'/></textarea>
	</form>
	<p class="validateTips"></p>
</div>

<!-- 发表评论窗口 (Movie)-->
<div id="addCommentDialog" title="发表评论" style="display:none">
	<form id="commentForm" action="comment!addCommentMovie" method="post">
		<input type="hidden" name="commentMovie.movie.statistics.id" value="<s:property value='movie.statistics.id'/>"/>
		<input type="hidden" name="commentMovie.movie.id" value="<s:property value='movie.id'/>"/>
		<input type="hidden" name="commentMovie.account.id" value="<s:property value='#session.account.id'/>"/>
		<input type="hidden" id="sendToWeibo" name="commentMovie.sendToWeibo" value="false"/>
		<input type="hidden" name="commentMovie.movie.image.url" value="<s:property value='movie.image.src'/>"/>
		<textarea id="comment" name="commentMovie.content" style="width:550px;height:160px;"></textarea>
	</form>
	<p class="validateTips"></p>
</div>

<div class="nominationCategory">
	<div class="categoryTitle clearfix">
		<s:if test="#session.account!=null">
			<a NAME="Avideo" id="addVideo" style="cursor:pointer;">添加</a>
		</s:if><s:else>
			<a NAME="Avideo" id="loginFromAddVideo" style="cursor:pointer;">添加</a>
		</s:else>
		<h3><span class="GRAYTITLE">在线观看</span>  HD</h3>
	</div>
	<ul class="nomineeList clearfix" >		
			<li id="catNominee_413" class=" Nominee clearfix" style="min-height: 50px; ">			  
				<div class="nomineeListItemContainer" style="min-height: 50px;">
					<div class="nomineeTitle detailedInfo" style="white-space:nowrap; width:950px;">						  
					  <s:iterator value="movie.videos" status="stat">					  
						<div class="videothumb" >
							<a href="<s:property value='url'/>" target="_blank" title="点击观看">
							  <img style="border:1px grey solid;" src="./img/<s:property value='provider'/>.png"/>		
							   <s:if test='type == 1'><code class="og"></code></s:if>
							   <s:elseif test='type == 2'><code class="oc"></code></s:elseif>
							   <s:else><code class="ob"></code></s:else>
							</a>   					  
							   <div class="dock">
							     <em style="float:left;color:white;font-weight:bold;margin-left:2px;"><s:property value='name'/></em>
							     <em style="float:right;color:white;font-weight:bold;margin-right:2px;"><s:property value='length'/>分钟</em>
							   </div>							   							                                   							    							    							    							    													
							<span  style="position:relative;margin:10px 0px 15px 0px;top:5px;">来源：<a href="javascript:void(0)" wb_screen_name="<s:property value="account.name"/>"><s:property value="account.name"/></a></span>
					
							<s:if test="#session.account!=null && #session.account.id==account.id">
								<a id="delVideo" class="delVideo" style="cursor:pointer;" movieId="<s:property value='movie.id'/>" videoId="<s:property value='id'/>">删除</a>
								<a id="editVideo" class="editVideo" style="cursor:pointer;" videoId="<s:property value='id'/>" url="<s:property value='url'/>" name="<s:property value='name'/>" length="<s:property value='length'/>" provider="<s:property value='provider'/>" quality="<s:property value='type'/>">编辑</a>
							</s:if>
							
						</div>
					  </s:iterator>
					  <s:if test='movie.videos.size == 0'>
						<div style="display:inline-block; padding:10px; ">
							暂无视频
						</div>
					  </s:if>
					</div>																								
				</div>								
			</li>
	</ul>
</div>
<!-- nominationCategory -->


<div class="nominationCategory">
	<div class="categoryTitle clearfix">
		<s:if test="#session.account!=null">
			<a NAME="Aplot" id="editDescription" style="cursor:pointer;">编辑</a>
		</s:if><s:else>
			<a NAME="Aplot" id="loginFromEditDescription" style="cursor:pointer;">编辑</a>
		</s:else>
		
		<h3><span class="GRAYTITLE">剧情</span> PLOT</h3>
	</div>
	<ul class="nomineeList clearfix">
		<li id="catNominee_413" class=" Nominee clearfix">
			<div class="nomineeListItemContainer">
				<div class="nomineeTitle detailedInfo" >
					<s:property value="movie.plot" escape="false" />
				</div>		
			</div>
		</li>
	</ul>
</div>
<!-- nominationCategory -->
						
						
<div class="nominationCategory">
	<div class="categoryTitle clearfix">
		<A NAME="Aaward" href="#"></A>
		<h3><span class="GRAYTITLE">获奖</span> AWARD</h3>
	</div>
	<ul id="award" class="nomineeList clearfix">
		<li id="catNominee_413" class=" Nominee clearfix">
			<div class="nomineeListItemContainer">
				<div class="nomineeTitle detailedInfo">
					<s:iterator value="movie.mpacs" status="stat">
						<s:property value="calendar.nameCn" /> - 
						<s:property value="award.displayName" /> 
						<s:if test="type==1">(<s:property value="typeName" escape="false"/>)</s:if> 
						<s:elseif test="type==2"><img src="img/img_winnerMarker.png" style="height:11px;width:48px;margin-bottom: -1px;"/></s:elseif>
						<s:if test="person!=null">- 
						<a href="person!load?person.id=<s:property value='person.id'/>"><s:property value="person.displayName" escape="false"/></a>
						</s:if>
						<br/>
					</s:iterator>
				</div>
			</div>
		</li>
	</ul>
</div>
<!-- nominationCategory -->

																								
<div class="nominationCategory">						
  <div class="categoryTitle clearfix">
	<a NAME="Arelated" href="#"></a>
	<h3><span class="GRAYTITLE">相关电影</span>  导演的其他电影</h3>
  </div>						
  <ul class="nomineeList clearfix" id="directorMovieList"></ul>
</div>

<!-- nominationCategory -->															
<div class="nominationCategory">							
	<div class="categoryTitle clearfix">
		<a href="#"></a>
		<h3><span class="GRAYTITLE">相关电影</span>  主演的其他电影</h3>
	</div>
	<ul class="nomineeList clearfix" id="actorMovieList"></ul>
</div>
						
						



<!-- template code for the movie tab -->
<span id="storedMovieTab">
<div id="dropDownMovie" style="display:none;">				  
<div id="tabs" class="tabs">
<div id="movieTabLoading" class="loadingImg"></div>	
              <ul>
                <li><a href="#tab1"><span>基本信息</span></a></li>
         <li><a href="#tab2"><span>剧情</span></a></li>
         <li><a href="#tab3"><span>剧照</span></a></li>
         <li style="display:none;"><a href="#tab4"><span>视频</span></a></li>
         <div style="float:right; margin-top: 4px;">
             <!-- badu -->
                 <div id="bdshare" class="bdshare_b" style="line-height: 12px; margin-top:-2px;">
  <img src="img/social_banner.png" />
</div>
<script type="text/javascript" id="bdshare_js" data="type=button&amp;uid=158997" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">								    

</script>
<!-- Baidu Button END -->
         </div>
       </ul>                      
          <div id="tab1">
          <div style="float:left;">                      
            <img src="uploaded/images/thumb.png" class="tabMainImg"/>
            <div class="clear"></div>
              
          </div>   
          <br/>                                                
              <div>
                <span class="tabFont1" >上映：</span> <span id="datetime" class="tabFont2 mcard" style="display:inline-block;width:250px;"></span>                             
                <span class="tabFont1">地区：</span> <span id="country" class="tabFont2 mcard"></span>                             
              </div>                      
              <div>
                <span class="tabFont1" >分类：</span> <span id="category" class="tabFont2 mcard" style="display:inline-block;width:250px;"></span>                            
                <span class="tabFont1">语言：</span> <span id="language" class="tabFont2 mcard"></span>	
              </div>                      
              <div>
                 <span class="tabFont1">导演：</span>  <span id="director" class="tabFont2 mcard"></span>
              </div>                      
              <div>
                <span class="tabFont1">主演：</span> <span id="actor" class="tabFont2 mcard"></span>
              </div>
              <br/>                      
              <div>
                <span class="tabFont1"><img src="img/Oscar.png" style="width:20px;height:50px;margin-right:10px;"/></span>                                                          
				<span id="award"  class="tabFont1" style="display:inline-block"></span>
              </div>                                       
       </div>

       <div id="tab2">
         <div id="plot" class="nomineeTitle detailedInfo">
         </div>
         
       </div>                                                                                               
       <div id="tab3">
        	暂无
         <div id="pictures" style="display:none">
           <div id="footbar" class="trans" >
              <img src="img/prev.png" id="swipe_nav_prev" style="cursor:pointer; margin:7px 5px 0px 0px;position:relative;"/>                             
              <img src="img/next.png" id="swipe_nav_next" style="cursor:pointer; margin:7px 0px 0px 5px;position:relative;"/>
           </div>
         </div>            						                   
       </div>
       <div id="tab4">
         <div style="height:350px;">
         </div>
       </div>                              
     </div><!-- <div id="tabs" class="tabs"> -->
  </div>
</span>

<!-- nominationCategory 评论-->
<div class="nominationCategory" >
	<div class="categoryTitle clearfix">
		<s:if test="#session.account!=null">
			<a NAME="Acomment" id="addComment" style="cursor:pointer;">评论 (<s:property value="movie.statistics.commented"/>)</a>
		</s:if><s:else>
			<a NAME="Acomment" id="loginFromAddComment" style="cursor:pointer;">评论 (<s:property value="movie.statistics.commented"/>)</a>
		</s:else> 
		<h3><span class="GRAYTITLE">评论</span> COMMENT</h3>
	</div>
	<ul class="nomineeList clearfix">
		<li id="catNominee_413" class="Nominee clearfix">
			<div class="nomineeListItemContainer">
				<div class="nomineeTitle detailedInfo">
					<s:if test='comments.size == 0'>
						<div style="display:inline-block; padding:10px; ">
							暂无评论
						</div>
				    </s:if><s:else>
				    
					
					<s:iterator value="comments" status="stat">
						
						<div style="border-bottom:0px solid red; width:930px">
						
							<div style="border:0px solid yellow; width:150px; float:right">
								<s:property value="datetime" />
							</div>
							
							<div style="border:0px solid blue; width:850px;float:right">
								<s:property value="content" />
							</div>
							
							<div style="border:0px solid blue; width:80px;">
								<a wb_user_id="<s:property value="account.weiboId"/>" >
									<img src="<s:property value="account.icon" />" style="border:1px solid gray; padding: 3px;"/><br>
									<s:property value="account.name" />
								</a>
							</div>
							
						</div>
						 
						<br>
					</s:iterator>
					
				    <!-- Paging starts -->
					<s:a href="movie!load?movie.id=%{movie.id}&paging.currentPage=1#Acomment"> |< </s:a>
					<s:if test="%{paging.currentPage>1}"><s:a href="movie!load?movie.id=%{movie.id}&paging.currentPage=%{paging.currentPage-1}#Acomment"> << </s:a></s:if>
					<s:else><<</s:else>
					&nbsp;&nbsp;<s:property value="paging.currentPage" />/<s:property value="paging.totalPage" />&nbsp;&nbsp;
					<s:if test="%{paging.currentPage<paging.totalPage}"><s:a href="movie!load?movie.id=%{movie.id}&paging.currentPage=%{paging.currentPage+1}#Acomment">>></s:a></s:if>
					<s:else>>></s:else>
					<s:a href="movie!load?movie.id=%{movie.id}&paging.currentPage=%{paging.totalPage}#Acomment"> >| </s:a>
					<!-- Paging ends -->
					</div>
					</s:else>
				</div>		
			</div>
		</li>
	</ul>
</div><!--nominationCategory-->

<!-- ------------------------- -->
<!-- tiles/movie/list.jsp ENDS -->
<!-- ------------------------- -->